package com.wodsy.phoenix.datadao.shoppingcart.dao.impl;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.wodsy.phoenix.datadao.base.BaseHibernateDao;
import com.wodsy.phoenix.datadao.shoppingcart.dao.ShoppingcartDao;
import com.wodsy.phoenix.dataobject.shoppingcart.model.Shoppingcart;


@Repository("shoppingcartDao")
public class ShoppingcartDaoImpl extends BaseHibernateDao<Shoppingcart,Long> implements ShoppingcartDao {

	@Override
	public Class<Shoppingcart> getModelClass() {
		return Shoppingcart.class;
    }

    @Override
    @Autowired
    @Qualifier(value="shoppingcart")
    public void setSessionFactory(SessionFactory sessionFactory) {
    	this.sessionFactory = sessionFactory;
    }

    @Override
	public Shoppingcart getMyShoppingcartById(Long id) {
    	/*return getSession().createCriteria(getModelClass())
				.add(Restrictions.eq("status", CmsContentStatus.ISONLINE.getKey()))*/
    	return get(id);
	}
    
	@Override
	public Shoppingcart getMyShoppingcartByUid(Integer userId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer addMyShoppingcart(Shoppingcart shoppingcart) {
		return null;
	}

	@Override
	public void updateShoppingcart(Shoppingcart shoppingcart) {
		// TODO Auto-generated method stub
		
	}
    
}
